package com.zh;

import org.apache.commons.lang.StringUtils;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Created by zhanghao on 2017/7/14.
 */
@SpringBootApplication
@ImportResource(value = {"classpath:dubbo.xml"})
public class AppStart {
    public static void main(String[] args) {
        SpringApplication.run(AppStart.class, args);

        System.out.println("系统启动完毕.Ctrl+C或者输入exit退出");

        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try {
            String input = reader.readLine();
            while (!StringUtils.equals("exit", input)) {
                input = reader.readLine();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
